package cn.lger.icollege.dao;

import cn.lger.icollege.entity.Notice;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;


/**
 * Code that Changed the World
 * Pro said
 * Created by Pro on 2018-04-14.
 */
@Repository
public interface NoticeDao extends JpaRepository<Notice, String> {

    Page<Notice> findByClassroom_ClassIdOrderByCreateDateDesc(Pageable pageable,Long ClassId);

    int deleteByIdAndTeacherUsername(String id, String userDetailsUsername);


}
